<!-- 顶部 -->
<div class="iframe-header">
    <nav class="navbar navbar-default">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a href="javascript:;" class="navbar-brand"><?=config_item('my_title')?></a>
        </div>
        <div class="collapse navbar-collapse" id="navbar">
            <ul class="nav navbar-nav">
                <?php foreach($top_menu as $val):?>
                <li class="<?=$val['active']?>">
                    <a href="<?=$val['url']?>">
                        <?php if($val['icon']):?>
                        <i class="<?=$val['icon']?>"></i>
                        <?php endif;?>
                        <?=$val['name']?>
                        <?php if($val['user_type']=='dev'):?>
                        <span class="label label-danger"><?=$val['user_type']?></span>
                        <?php endif;?>
                    </a>
                </li>
                <?php endforeach;?>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li>
                    <a href="../"
                       target="_blank"
                       title="网站首页">
                        <i class="fa fa-home"></i>
                        <span>网站首页</span>
                    </a>
                </li>
                <li>
                    <a href="<?=site_url('index/logout')?>"
                       title="退出登录">
                        <i class="fa fa-sign-out"></i>
                        <span>退出登录</span>
                    </a>
                </li>
            </ul>
        </div>
    </nav>
</div>